<!--
 * @Descripttion: 
 * @version: 
 * @Author: Xyl
 * @Date: 2023-04-28 16:33:40
 * @LastEditors: zoey
 * @LastEditTime: 2023-05-18 14:51:39
-->
<template>
  <div>
    <a-breadcrumb style="color:white">
      <a href="https://192.3.96.11:10443/cgi-bin/situationalAwareness.cgi" style="color: white;">
        <a-breadcrumb-item>首页</a-breadcrumb-item>
      </a>
            <!-- <a-breadcrumb-item>系统列表</a-breadcrumb-item> -->
      <a-breadcrumb-item style="color:aquamarine">线程取证</a-breadcrumb-item>
      <router-link to="/Content" style="color: white;">
        <a-breadcrumb-item>返回</a-breadcrumb-item>
      </router-link>

    </a-breadcrumb>
    <block style="marginTop:20px;marginBottom:60px"></block>
    <!-- 开始取证按钮 -->
    <!-- <a-button type="primary" @click="startForensics" style="margin: 10px;">
      开始取证
    </a-button> -->

    <a-modal
      v-model="isSuccessModalVisible"
      title="取证成功"
      @ok="handleOk"
      @cancel="handleCancel"
      :footer="null"    
    >
      <p>取证已成功完成！</p>
      <a-button type="primary" @click="handleClose">关闭</a-button>
    </a-modal>
    <a-alert message="我们在此展示线程取证信息，包含区块ID、取证时间、父进程ID、线程ID、线程数量等信息。"
      description="Here we display thread forensics information, including block ID, user, process ID 、thread ID and other information."
      type="info" style="marginTop:160px;marginBottom:20px" />
    <ThreadForensicsCom></ThreadForensicsCom>
  </div>
</template>
<script>
  import axios from 'axios';
  import ThreadForensicsCom from "../components/ThreadForensicsCom.vue"
  import block from "../components/block.vue";
  export default {
    inject: ['reload'],
    components: {
      block,
      ThreadForensicsCom
    },
    data(){
      return{      isSuccessModalVisible: false, // 控制弹窗显示的状态
      }
    },
    methods: {
      // async startForensics() {
      //   const resData = await axios({
      //     method: 'post',
      //     url: '/apilog/createInfo',
      //     data: {
      //       "uuid": "10086",
      //       "info": {
      //         "start_time": "1421927414",
      //         "last_time": "1421927416",
      //         "attack_category": "Reconnaissance",
      //         "attack_subcategory": "HTTP",
      //         "protocol": "tcp",
      //         "source_IP": "175.45.176.0",
      //         "source_port": "13284",
      //         "destination_IP": "149.171.126.16",
      //         "destination_port": "80",
      //         "attack_name": "Domino Web Server Database Access: /doladmin.nsf (https://strikecenter.bpointsys.com/bps/strikes/recon/http/domino/access_domino_doladmin_nsf.xml)",
      //         "attack_reference": "-"
      //       }
      //     }
      //   }).then((res) => {
      //     console.log("start_forensics_res:", res);
      //     this.reload();
      //     // this.uuid = res.data.result.uuid;
      //     // console.log("this.uuid:", this.uuid);
      //     //this.flag = 1;
      //     //this.tableRowClass();
      //   });
      // },
      startForensics() {
      // 设置一个15秒的定时器
      setTimeout(() => {
        this.isSuccessModalVisible = true; // 15秒后显示弹窗
      }, 10000);
    },
    handleOk() {
      this.isSuccessModalVisible = false; // 这个方法在这里不会被调用，因为没有确定按钮
    },
    handleCancel() {
      this.isSuccessModalVisible = false; // 这个方法在这里也不会被调用，因为没有取消按钮
    },
    handleClose() {
      this.isSuccessModalVisible = false; // 关闭弹窗的方法
    },
    },
  };
</script>
<style scoped>
  h2 {
    textAlign: center;
    font-size: 2em;
  }
</style>